import socket

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

client.connect(("127.0.0.1",60000))

while True:
    msg = input("请输入你要发送的消息：")
    client.send(msg.encode("utf-8"))
    # 接受消息
    res = client.recv(1024*1024)
    print(res.decode("utf-8"))